
#ifndef SERVER_H_
#define SERVER_H_

#include "public.h"

using boost::asio::ip::tcp;
using namespace std;
using namespace Image::protobuf;

class server
{
public:
    server(boost::asio::io_context &io_context, short port)
        : acceptor_(io_context, tcp::endpoint(tcp::v4(), port))
    {
        do_accept();
    }

private:
    void do_accept();

    tcp::acceptor acceptor_;
};

#endif
